package libra.controller;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient( value = "PROVIDER-PAYMENT-HYSTRIX", fallback = ConsumerFeignFallBack.class )
public interface ConsumerFeignService {
	@PostMapping("providerPayment_Hystrix/provider/save")
	public Object create( @RequestParam("serial") String serial );
	
	@PostMapping("providerPayment_Hystrix/provider/queryOne")
	public Object find( @RequestParam("id") Integer id  );
	
	@PostMapping("providerPayment_Hystrix/provider/queryList")
	public Object list( );
	
	@PostMapping("providerPayment_Hystrix/provider_hystrix/ok")
	public Object Ok( );
	
	@PostMapping("providerPayment_Hystrix/provider_hystrix/timeOutWithHystrix")
	public Object TimeOutWithHystrix( @RequestParam("flag") Boolean flag  );
	
	@PostMapping("providerPayment_Hystrix/provider_hystrix/errorWithHystrix")
	public Object ErrorWithHystrix( @RequestParam("flag") Boolean flag );
	
	@PostMapping("providerPayment_Hystrix/provider_hystrix/timeOut")
	public Object TimeOut( @RequestParam("flag") Boolean flag  ) throws Exception;
	
	@PostMapping("providerPayment_Hystrix/provider_hystrix/error")
	public Object Error( @RequestParam("flag") Boolean flag ) throws Exception;
}
